#include <ut/UnitTest.h>
#include <illib/Log.h>
#include <ilrt/Runtime.h>

using namespace ilrt;

namespace ilrt_ut{
	void Type_ut() {
		Runtime &rt = runtime();
		ut::UnitTestLogger logger(TN(ilrt_ut::Type_ut));
		{
			BasicPointer p;
			ut::test(AT(), EX(&p._type() == &rt.types.Undefined), TN(ilrt::BasicTypedPointer));
			ut::test(AT(), EX(p.isUndefined()), TN(ilrt::BasicTypedPointer));
			p.destroy();

			ut::test(AT(), EX(BasicPointer::None.isNone()), TN(ilrt::BasicTypedPointer));
			ut::test(AT(), EX(!BasicPointer::None.isUndefined()), TN(ilrt::BasicTypedPointer));
		}
		{
			BasicTypedPointer i = rt.types.Boolean._create();
			ut::test(AT(), EX(&i._type() == &rt.types.Boolean), TN(ilrt::BasicTypedPointer));
			i.destroy();
		}
		{
		}
		{

		}
	}
};
